G3D support
Glest and its forks currently are restricted to the G3D modeling format. Currently an up-to-date importer and exporter only exist for Blender, requiring that Blender is used for modeling or at least converting imported models. This is done with the G3D support python script, which allows Blender to both import and export G3D models. Download The script to use depends entirely on the version of Blender used. It is strongly recommended to use the latest version of the export script, which this page will be detailing. Installation #In the info window, under the file option, choose "user preferences". #In this new window, switch to the addons tab and click the "install add-on" button at the bottom. #Open the python file you just downloaded. #*Alternatively, it's possible to manually install the script by placing it in the Blender scripts folder. The location varies depending on where you told the installer to create this folder, and could be in the installation directory or a user directory (such as the home folder or the AppData folder). #The addon will now be found in this window, in the import-export category, under the name "G3D Mesh Import/Export". Tick the checkbox beside it to enable it. #Note that in order to be able to export in future sessions, you must save the user preferences with Ctrl + U. Limitations *All faces must be triangulated (the 2.6x exporter automatically converts them to triangles before export). Faces can be converted to triangles by selecting all faces and using the hotkey ctrl + T. *The axis differs in G3D, with the Y axis being height, X axis being length, and Z axis being width, unlike Blender's default of the Z axis being height, X being length, and Y being width. Model preparation *The start and end animation frame should be set appropriately. A large number of frames causes a massive filesize. G3D interposition of frames is considerably smoother than viewed in Blender, so models should rarely require more than 30 frames. If the model is unanimated, the start aand end frame should be set to 1 in the timeline window. *The texture of the model must be properly linked in order for it to appear on the exported G3D model. To link the texture, in the properties window, under the textures tab, with the model selected, set the type to "Image or movie" and open the image. *In the G3D support panel, under Object Data in the properties window, the model can be single sided or double sided (which controls whether or not the object can only be viewed from one side), have teamcolor or transparency (if team colour is toggled, alpha in the texture will be replaced with team colour), and be toggled as selectable or not (non-selectable objects can't be clicked on to select the unit, such as the pebbles that scatter when a worker is mining). *In versions older than the Blender 2.63 version of the script: **Single sided or double sided can be toggled object data tab in the properties window, by ticking or unticking the double sided box. This defaults to double sided, which means the faces from both sides of the model, compared to just the side the face's normal points. **The usage of teamcolour or transparency is toggled in the materials tab of the properties window. Under the options header, if "face textures alpha" is ticked, alpha in the texture will become transparency. If unticked, as is the default, alpha will be replaced with teamcolor. *To make a material partially transparent (for use such as transparent teamcolor), in the materials tab of the properties window, check the transparency box and under Z transparency, adjust the alpha slider. Exporting To export a model to G3D, in object mode, select the meshes you want to export (if nothing is selected, everything will be exported, then open the file menu of the info window, choose export, and select "Glest 3D File (g3d)". Choose a file location and all objects will be exported to G3D (non-compatible objects such as bones, cameras, or lights will not be exported). Importing To import a model from G3D, open the file menu of the info window, choose import, and select "Glest 3D File (g3d)". Choose the file to load and it will be loaded at the origin. Note that animations cannot be imported, only the meshes and UV (texture) coordinates. Troubleshooting *'White model' - The texture was not properly linked to the object (detailed above). *'Model is sideways' - Model not orientated properly. The Y axis is height, the X axis is length, and the Z axis is width, unlike Blender's defaults. See also *Blender *3DSMax Category:Modelling